Integrand size = 25, antiderivative size = 108 \[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\frac {e \left (d^2-e^2 x^2\right )^p \left (1-\frac {e^2 x^2}{d^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1-p,\frac {1}{2},\frac {e^2 x^2}{d^2}\right )}{d^2 x}-\frac {e^2 \left (d^2-e^2 x^2\right )^p \operatorname {Hypergeometric2F1}\left (2,p,1+p,1-\frac {e^2 x^2}{d^2}\right )}{2 d^3 p} \]
e*(-e^2*x^2+d^2)^p*hypergeom([-1/2, 1-p],[1/2],e^2*x^2/d^2)/d^2/x/((1-e^2* x^2/d^2)^p)-1/2*e^2*(-e^2*x^2+d^2)^p*hypergeom([2, p],[p+1],1-e^2*x^2/d^2) /d^3/p
Leaf count is larger than twice the leaf count of optimal. \(219\) vs. \(2(108)=216\).
Time = 0.59 (sec) , antiderivative size = 219, normalized size of antiderivative = 2.03 \[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\frac {\left (d^2-e^2 x^2\right )^p \left (\frac {2 d^2 e \left (1-\frac {e^2 x^2}{d^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},\frac {e^2 x^2}{d^2}\right )}{x}+\left (1-\frac {d^2}{e^2 x^2}\right )^{-p} \left (\frac {d^3 \operatorname {Hypergeometric2F1}\left (1-p,-p,2-p,\frac {d^2}{e^2 x^2}\right )}{(-1+p) x^2}+e^2 \left (\frac {\left (2-\frac {2 d^2}{e^2 x^2}\right )^p (d-e x) \left (1+\frac {e x}{d}\right )^{-p} \operatorname {Hypergeometric2F1}\left (1-p,1+p,2+p,\frac {d-e x}{2 d}\right )}{1+p}+\frac {d \operatorname {Hypergeometric2F1}\left (-p,-p,1-p,\frac {d^2}{e^2 x^2}\right )}{p}\right )\right )\right )}{2 d^4} \]
((d^2 - e^2*x^2)^p*((2*d^2*e*Hypergeometric2F1[-1/2, -p, 1/2, (e^2*x^2)/d^ 2])/(x*(1 - (e^2*x^2)/d^2)^p) + ((d^3*Hypergeometric2F1[1 - p, -p, 2 - p, d^2/(e^2*x^2)])/((-1 + p)*x^2) + e^2*(((2 - (2*d^2)/(e^2*x^2))^p*(d - e*x) *Hypergeometric2F1[1 - p, 1 + p, 2 + p, (d - e*x)/(2*d)])/((1 + p)*(1 + (e *x)/d)^p) + (d*Hypergeometric2F1[-p, -p, 1 - p, d^2/(e^2*x^2)])/p))/(1 - d ^2/(e^2*x^2))^p))/(2*d^4)
Time = 0.24 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {583, 542, 243, 75, 279, 278}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx\) |
\(\Big \downarrow \) 583 |
\(\displaystyle \int \frac {(d-e x) \left (d^2-e^2 x^2\right )^{p-1}}{x^3}dx\) |
\(\Big \downarrow \) 542 |
\(\displaystyle d \int \frac {\left (d^2-e^2 x^2\right )^{p-1}}{x^3}dx-e \int \frac {\left (d^2-e^2 x^2\right )^{p-1}}{x^2}dx\) |
\(\Big \downarrow \) 243 |
\(\displaystyle \frac {1}{2} d \int \frac {\left (d^2-e^2 x^2\right )^{p-1}}{x^4}dx^2-e \int \frac {\left (d^2-e^2 x^2\right )^{p-1}}{x^2}dx\) |
\(\Big \downarrow \) 75 |
\(\displaystyle -e \int \frac {\left (d^2-e^2 x^2\right )^{p-1}}{x^2}dx-\frac {e^2 \left (d^2-e^2 x^2\right )^p \operatorname {Hypergeometric2F1}\left (2,p,p+1,1-\frac {e^2 x^2}{d^2}\right )}{2 d^3 p}\) |
\(\Big \downarrow \) 279 |
\(\displaystyle -\frac {e \left (d^2-e^2 x^2\right )^p \left (1-\frac {e^2 x^2}{d^2}\right )^{-p} \int \frac {\left (1-\frac {e^2 x^2}{d^2}\right )^{p-1}}{x^2}dx}{d^2}-\frac {e^2 \left (d^2-e^2 x^2\right )^p \operatorname {Hypergeometric2F1}\left (2,p,p+1,1-\frac {e^2 x^2}{d^2}\right )}{2 d^3 p}\) |
\(\Big \downarrow \) 278 |
\(\displaystyle \frac {e \left (d^2-e^2 x^2\right )^p \left (1-\frac {e^2 x^2}{d^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1-p,\frac {1}{2},\frac {e^2 x^2}{d^2}\right )}{d^2 x}-\frac {e^2 \left (d^2-e^2 x^2\right )^p \operatorname {Hypergeometric2F1}\left (2,p,p+1,1-\frac {e^2 x^2}{d^2}\right )}{2 d^3 p}\) |
(e*(d^2 - e^2*x^2)^p*Hypergeometric2F1[-1/2, 1 - p, 1/2, (e^2*x^2)/d^2])/( d^2*x*(1 - (e^2*x^2)/d^2)^p) - (e^2*(d^2 - e^2*x^2)^p*Hypergeometric2F1[2, p, 1 + p, 1 - (e^2*x^2)/d^2])/(2*d^3*p)
3.3.74.3.1 Defintions of rubi rules used
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x )^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[n] && (IntegerQ[m] || GtQ[-d/(b*c), 0])
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2 Subst[In t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I ntegerQ[(m - 1)/2]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( -b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && (ILtQ[p, 0 ] || GtQ[a, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntP art[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p]) Int[(c*x)^m* (1 + b*(x^2/a))^p, x], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && !(ILtQ[p, 0] || GtQ[a, 0])
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c Int[x^m*(a + b*x^2)^p, x], x] + Simp[d Int[x^(m + 1)*(a + b*x^2 )^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && IntegerQ[m] && !IntegerQ[2*p]
Int[((e_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c^(2*n)/a^n Int[(e*x)^m*((a + b*x^2)^(n + p)/(c - d*x)^ n), x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[b*c^2 + a*d^2, 0] && I LtQ[n, 0]
\[\int \frac {\left (-e^{2} x^{2}+d^{2}\right )^{p}}{x^{3} \left (e x +d \right )}d x\]
\[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\int { \frac {{\left (-e^{2} x^{2} + d^{2}\right )}^{p}}{{\left (e x + d\right )} x^{3}} \,d x } \]
Result contains complex when optimal does not.
Time = 13.40 (sec) , antiderivative size = 484, normalized size of antiderivative = 4.48 \[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\begin {cases} - \frac {0^{p} d^{2} d^{2 p - 3}}{2 x^{2}} + \frac {0^{p} d d^{2 p - 3} e}{x} + \frac {0^{p} d^{2 p - 3} e^{2} \log {\left (\frac {e^{2} x^{2}}{d^{2}} \right )}}{2} - \frac {0^{p} d^{2 p - 3} e^{2} \log {\left (-1 + \frac {e^{2} x^{2}}{d^{2}} \right )}}{2} - 0^{p} d^{2 p - 3} e^{2} \operatorname {acoth}{\left (\frac {e x}{d} \right )} + \frac {d e^{2 p - 2} p x^{2 p - 4} e^{i \pi p} \Gamma \left (p\right ) \Gamma \left (2 - p\right ) {{}_{2}F_{1}\left (\begin {matrix} 1 - p, 2 - p \\ 3 - p \end {matrix}\middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{2 \Gamma \left (3 - p\right ) \Gamma \left (p + 1\right )} - \frac {e^{2 p - 1} p x^{2 p - 3} e^{i \pi p} \Gamma \left (p\right ) \Gamma \left (\frac {3}{2} - p\right ) {{}_{2}F_{1}\left (\begin {matrix} 1 - p, \frac {3}{2} - p \\ \frac {5}{2} - p \end {matrix}\middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{2 \Gamma \left (\frac {5}{2} - p\right ) \Gamma \left (p + 1\right )} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\- \frac {0^{p} d^{2} d^{2 p - 3}}{2 x^{2}} + \frac {0^{p} d d^{2 p - 3} e}{x} + \frac {0^{p} d^{2 p - 3} e^{2} \log {\left (\frac {e^{2} x^{2}}{d^{2}} \right )}}{2} - \frac {0^{p} d^{2 p - 3} e^{2} \log {\left (1 - \frac {e^{2} x^{2}}{d^{2}} \right )}}{2} - 0^{p} d^{2 p - 3} e^{2} \operatorname {atanh}{\left (\frac {e x}{d} \right )} + \frac {d e^{2 p - 2} p x^{2 p - 4} e^{i \pi p} \Gamma \left (p\right ) \Gamma \left (2 - p\right ) {{}_{2}F_{1}\left (\begin {matrix} 1 - p, 2 - p \\ 3 - p \end {matrix}\middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{2 \Gamma \left (3 - p\right ) \Gamma \left (p + 1\right )} - \frac {e^{2 p - 1} p x^{2 p - 3} e^{i \pi p} \Gamma \left (p\right ) \Gamma \left (\frac {3}{2} - p\right ) {{}_{2}F_{1}\left (\begin {matrix} 1 - p, \frac {3}{2} - p \\ \frac {5}{2} - p \end {matrix}\middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{2 \Gamma \left (\frac {5}{2} - p\right ) \Gamma \left (p + 1\right )} & \text {otherwise} \end {cases} \]
Piecewise((-0**p*d**2*d**(2*p - 3)/(2*x**2) + 0**p*d*d**(2*p - 3)*e/x + 0* *p*d**(2*p - 3)*e**2*log(e**2*x**2/d**2)/2 - 0**p*d**(2*p - 3)*e**2*log(-1 + e**2*x**2/d**2)/2 - 0**p*d**(2*p - 3)*e**2*acoth(e*x/d) + d*e**(2*p - 2 )*p*x**(2*p - 4)*exp(I*pi*p)*gamma(p)*gamma(2 - p)*hyper((1 - p, 2 - p), ( 3 - p,), d**2/(e**2*x**2))/(2*gamma(3 - p)*gamma(p + 1)) - e**(2*p - 1)*p* x**(2*p - 3)*exp(I*pi*p)*gamma(p)*gamma(3/2 - p)*hyper((1 - p, 3/2 - p), ( 5/2 - p,), d**2/(e**2*x**2))/(2*gamma(5/2 - p)*gamma(p + 1)), Abs(e**2*x** 2/d**2) > 1), (-0**p*d**2*d**(2*p - 3)/(2*x**2) + 0**p*d*d**(2*p - 3)*e/x + 0**p*d**(2*p - 3)*e**2*log(e**2*x**2/d**2)/2 - 0**p*d**(2*p - 3)*e**2*lo g(1 - e**2*x**2/d**2)/2 - 0**p*d**(2*p - 3)*e**2*atanh(e*x/d) + d*e**(2*p - 2)*p*x**(2*p - 4)*exp(I*pi*p)*gamma(p)*gamma(2 - p)*hyper((1 - p, 2 - p) , (3 - p,), d**2/(e**2*x**2))/(2*gamma(3 - p)*gamma(p + 1)) - e**(2*p - 1) *p*x**(2*p - 3)*exp(I*pi*p)*gamma(p)*gamma(3/2 - p)*hyper((1 - p, 3/2 - p) , (5/2 - p,), d**2/(e**2*x**2))/(2*gamma(5/2 - p)*gamma(p + 1)), True))
\[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\int { \frac {{\left (-e^{2} x^{2} + d^{2}\right )}^{p}}{{\left (e x + d\right )} x^{3}} \,d x } \]
\[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\int { \frac {{\left (-e^{2} x^{2} + d^{2}\right )}^{p}}{{\left (e x + d\right )} x^{3}} \,d x } \]
Timed out. \[ \int \frac {\left (d^2-e^2 x^2\right )^p}{x^3 (d+e x)} \, dx=\int \frac {{\left (d^2-e^2\,x^2\right )}^p}{x^3\,\left (d+e\,x\right )} \,d x \]